package com.un.ebs.inventory.dto;

import com.un.ebs.core.validator.NotLessThanZero;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author liubo
 * @email liubocs@163.com
 * @date 2020/5/24 9:23
 */
@Data
public class InventoryNoteItemDto implements Serializable {

    private String id;

    @NotNull(message = "skuId不能为空。")
    private String skuId;

    @NotLessThanZero(message = "数量不能为零。")
    private Double qty;

    private Double price;

    public InventoryNoteItemDto() {

    }

    public InventoryNoteItemDto(String id, String skuId, Double qty, Double price) {
        this.id = id;
        this.skuId = skuId;
        this.qty = qty;
        this.price = price;
    }

}
